feat(FR-2593): implement VFolder creation modal using V2 GraphQL mutation#6759
Open
ironAiken2 wants to merge 1 commit intomainfrom
Open
Conversation
Contributor
Author
Contributor
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 8.98% (-0.04% 🔻) |
1857/20688 |
| 🔴 | Branches | 8.12% (-0.06% 🔻) |
1187/14615 |
| 🔴 | Functions | 5.27% (-0.02% 🔻) |
295/5602 |
| 🔴 | Lines | 8.71% (-0.04% 🔻) |
1749/20072 |
Show new covered files 🐣
St.❔ |
File | Statements | Branches | Functions | Lines |
|---|---|---|---|---|---|
| 🔴 | ... / FolderCreateModalV2.tsx |
0% | 0% | 0% | 0% |
Test suite run success
865 tests passing in 40 suites.
Report generated by 🧪jest coverage report action from ea1af20
090778a to
fddd97a
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Implements and wires up a new vfolder creation modal (FolderCreateModalV2) that uses the V2 GraphQL createVfolderV2 mutation, and replaces existing call sites that used the legacy FolderCreateModal.
Changes:
- Added
react/src/components/FolderCreateModalV2.tsx(GraphQL mutation-based folder creation modal). - Replaced
FolderCreateModalusages withFolderCreateModalV2across user and admin pages/components. - Added “Create Folder” entry point to
AdminVFolderNodeListPageand wired it to the new modal (with project-folder creation enabled only there).
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| react/src/pages/VFolderNodeListPage.tsx | Switches folder creation modal to V2 implementation. |
| react/src/pages/StartPage.tsx | Switches folder creation modal to V2 implementation. |
| react/src/pages/AdminVFolderNodeListPage.tsx | Adds create-folder button and uses V2 modal with project-folder creation enabled. |
| react/src/components/VFolderTable.tsx | Switches folder creation modal to V2 implementation. |
| react/src/components/VFolderSelect.tsx | Switches folder creation modal to V2 implementation. |
| react/src/components/VFolderMountFormItem.tsx | Updates import/usage to V2 modal and documents removed prop. |
| react/src/components/ImportArtifactRevisionToFolderModal.tsx | Migrates to V2 modal using folderType="model_project" preset. |
| react/src/components/FolderCreateModalV2.tsx | New modal: GraphQL mutation + form UI/validation + notifications/events. |
| react/src/components/AdminModelCardSettingModal.tsx | Migrates to V2 modal using folderType="model_project" preset. |
6 tasks
fddd97a to
336251a
Compare
This was referenced Apr 21, 2026
336251a to
70f6fc0
Compare
5 tasks
agatha197
reviewed
Apr 22, 2026
70f6fc0 to
287640c
Compare
f93809c to
8c00246
Compare
8c00246 to
61b01aa
Compare
This was referenced Apr 23, 2026
61b01aa to
14f9776
Compare
5 tasks
52e0499 to
1f30f13
Compare
5 tasks
795a7f5 to
e3deb1f
Compare
nowgnuesLee
requested changes
Apr 27, 2026
ef6dc35 to
6405784
Compare
…tion Resolves #6755(FR-2593) - Create FolderCreateModalV2.tsx using Relay useMutation with createVfolderV2 - Map form values to CreateVFolderV2Input (usageMode, projectId, permission, cloneable) - Map V2 response (VFolder with nested metadata/accessControl/ownership) back to FolderCreationResponse for backward compatibility - Keep useTanQuery for list_allowed_types() since no V2 equivalent exists - Update all consumers to import FolderCreateModalV2 - Original FolderCreateModal.tsx left untouched per epic guidelines Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6405784 to
ea1af20
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Resolves #6755 (FR-2593)
Summary
Introduces
FolderCreateModalV2, a rewrite of the VFolder creation modal on the V2 GraphQLcreateVfolderV2mutation. The bigger structural change in this PR is moving caller-intent (user vs. admin context) from implicit role inference into explicit, declarative props, and replacing the open-endedhiddenFormItemsescape hatch with a typedfolderTypepreset.User / admin separation
Previously the original
FolderCreateModaldecided whether to expose the project-folder option purely by reading the current user's role:This leaks admin UI when a superadmin user opens the same modal from a user-facing page (e.g. their personal Data page) — they would see project folder creation that doesn't belong in that context.
FolderCreateModalV2flips this: the page declares its context, and the modal honors it.allowCreateProjectFolder?: boolean(defaultfalse)Caller-controlled flag indicating the modal is being opened from an admin context where project folder creation should be exposed.
allowCreateProjectFolder→ project option becomes available.admin/superadmin) is kept as defense-in-depth, so a non-admin who somehow lands on an admin context (route-level permission misconfig) still cannot see the option.Effective condition for showing the project option:
folderType?: 'model_project'Replaces the prior pattern of
initialValues={...} + hiddenFormItems=[...]for "create a folder of a fixed shape" call sites. When set:usage_mode='model',type='project',permission='ro',cloneable=true(cloneableremains user-editable).nameandhost.folderTypeis intentionally a single-value union for now — extend it (e.g.'model_user') when the next preset is needed instead of adding more boolean flags.Removal of
hiddenFormItemsThe previous
hiddenFormItems: HiddenFormItemsType[]prop is removed. It was a leaky abstraction: callers had to know the modal's internal field names and individually opt out of each option. All real uses were really one of two intents — "this is an admin context" or "this is a model_project preset" — both now expressed declaratively.Caller updates
AdminModelCardSettingModalinitialValues={{ usage_mode: 'model', type: 'project', permission: 'ro', cloneable: true }}+ 4hiddenFormItemsentriesfolderType=\"model_project\"ImportArtifactRevisionToFolderModalfolderType=\"model_project\"AdminVFolderNodeListPageallowCreateProjectFolderVFolderMountFormItemhiddenFormItemshiddenFormItemsblock left as a TODO commentOther callers (
StartPage,VFolderNodeListPage,VFolderTable,VFolderSelect) only usedinitialValuesand are unaffected.V2 mutation
Folder creation now uses the
createVfolderV2mutation. The response is mapped back to the existingFolderCreationResponseshape so downstream code (notification, event dispatch, callers consumingresult.id) is unchanged. The RESTlist_allowed_typescall is retained as there is no V2 equivalent yet.Checklist: (if applicable)
createVfolderV2mutation availabilityAdminVFolderNodeListPage): admin should see the project type option via the new Create Folder button.